INCLUDE (CMakeForceCompiler)

SET(IS_CLANG on)
SET(CMAKE_C_FLAGS_INIT                "-Wall -std=c99")
SET(CMAKE_C_FLAGS_DEBUG_INIT          "-g")
SET(CMAKE_C_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
SET(CMAKE_C_FLAGS_RELEASE_INIT        "-O4 -DNDEBUG")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")

SET(CMAKE_CXX_FLAGS_INIT                "-Wall")
SET(CMAKE_CXX_FLAGS_DEBUG_INIT          "-g")
SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELEASE_INIT        "-O4 -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")

CMAKE_FORCE_C_COMPILER("/usr/bin/clang" "Clang")
CMAKE_FORCE_CXX_COMPILER("/usr/bin/clang++" "Clang++")
SET(CMAKE_RANLIB						"/usr/bin/llvm-ranlib" CACHE INTERNAL STRING)
SET(CMAKE_AR							"/usr/bin/llvm-ar" CACHE INTERNAL STRING)
SET(CMAKE_LINKER						"/usr/bin/llvm-ld" CACHE INTERNAL STRING)
SET(CMAKE_C_LINK_EXECUTABLE				"/usr/bin/llvm-ld <OBJECTS> -o  <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_LINK_EXECUTABLE			"/usr/bin/llvm-ld <OBJECTS> -o  <TARGET> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Xlinker=-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Xlinker=-rpath,")
